package cn.m1c.cntt.wuhan2020.cnttlifegoods.banner.controller

import cn.m1c.cntt.wuhan2020.cnttlifegoods.common.model.ResultVo
import com.alibaba.fastjson.JSON
import org.apache.logging.log4j.kotlin.Logging
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.*
import java.util.*
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

@Controller
@RequestMapping("/banner")
@CrossOrigin(origins = ["*"])
class BannerController: Logging {

    @GetMapping("/list" )
    @ResponseBody
    fun list(request: HttpServletRequest, response: HttpServletResponse):String{
        var bannerList : List<String> = listOf("https://qyuserfile.oss-cn-beijing.aliyuncs.com/eafaca8c6461def48f92079fd2989f39.jpg", "https://qyuserfile.oss-cn-beijing.aliyuncs.com/2e74f00be9260b18b51057c1fbd774b6.jpg")
        var resultVo = ResultVo<List<String>>(data = bannerList)
        return JSON.toJSONString(resultVo)
    }
}